package com.qf.hospital.exception;

import com.qf.hospital.enums.HospitalErrorEnums;

/**
 * @author Administrator
 * @version V1.0
 * @Project hospital
 * @Package com.qf.hospital.exception
 * @Description: ${TODO}
 * @Date 2021/10/15 15:30
 */
public class HospitalException extends RuntimeException{

    private Integer code;

    public HospitalException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public HospitalException(HospitalErrorEnums enums) {
        super(enums.getMsg());
        this.code = enums.getCode();
    }


    public Integer getCode() {
        return code;
    }
}
